import request from "@/router/axios";

export const getList = (current, size, params) => {
  return request({
    url: "/api/blade-article/article/page",
    method: "get",
    params: {
      ...params,
      current,
      size
    }
  });
};

export const remove = ids => {
  return request({
    url: "/api/blade-article/article/remove",
    method: "post",
    params: {
      ids
    }
  });
};

export const add = row => {
  return request({
    url: "/api/blade-article/article/saveOrUpdate",
    method: "post",
    data: row
  });
};

export const update = row => {
  return request({
    url: "/api/blade-article/article/saveOrUpdate",
    method: "post",
    data: row
  });
};

export const getCategoryTree = () => {
  return request({
    url: "/api/blade-article/article/category/query",
    method: "get",
    params: {}
  });
};
/*export const getCategoryTree = (current, size, params) => {debugger
  return request({
    url: '/api/blade-article/article/category/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}*/
